clc
clear
clear all
clf
close
close all
UFL=2^-1;
OFL=2^1*(2-2^-2);
fprintf("UFL=%f\n",UFL)
fprintf("OFL=%f\n",OFL)
fprintf(" 所有数字：-3.5，-3.0，-2.5，-2.0，\n" + ...
    "-1.75.-1.5，-1.25，-1.0，-0.875，-0.75，-0.625，\n-0.5，0，" + ...
    "0.5，0.625，0.75，0.875，\n1.0，1.25，1.5，1.75，2.0，2.5，3.0，3.5\n")
fprintf("enumerate:#F=25\n")
fprintf("corollary:#F=25\n")
x=[-3.5,-3.0,-2.5,-2.0,-1.75,-1.5,-1.25,-1.0,-0.875,-0.75,-0.625,-0.5,0, ...
    0.5,0.625,0.75,0.875,1.0,1.25,1.5,1.75,2.0,2.5,3.0,3.5];
figure(1);
hold on;
scatter(x, zeros(size(x)), 10, 'o', 'filled', 'MarkerFaceColor', 'blue');
line([min(x), max(x)], [0, 0], 'Color', 'black', 'LineStyle', '-');

title('F在数轴上的图像');
xlabel('Value');
yticks([]); % 隐藏 y 轴刻度
grid on;
x1=[-3.5,-3.0,-2.5,-2.0,-1.75,-1.5,-1.25,-1.0,-0.875,-0.75,-0.625,-0.5,0, ...
    0.5,0.625,0.75,0.875,1.0,1.25,1.5,1.75,2.0,2.5,3.0,3.5,-0.375,-0.25,-0.125,0.125,0.25,0.375];
figure(2);
scatter(x1, zeros(size(x1)), 10, 'o', 'filled', 'MarkerFaceColor', 'blue');
line([min(x1), max(x1)], [0, 0], 'Color', 'black', 'LineStyle', '-');

title('F在数轴上扩展的图像');
xlabel('Value');
yticks([]); % 隐藏 y 轴刻度
grid on;
fprintf("subnormal FPN numbers:-0.375,-0.25,-0.125,0.125,0.25,0.375\n")